package cn.jark.unified.dispose;

import cn.jark.unified.dispose.properties.GlobalDefaultProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;


@Configuration
@EnableConfigurationProperties(GlobalDefaultProperties.class)
@PropertySource(value = "classpath:dispose.properties", encoding = "UTF-8")
public class GlobalDefaultAutoConfiguration {


    @Bean
    public UnifiedResponseAdvice unifiedResponseAdvice(GlobalDefaultProperties globalDefaultProperties) {
        return new UnifiedResponseAdvice(globalDefaultProperties);
    }

}
